/**
 * The Starting point for this library, call EasySvg.svg method to create a SVG canvas element
 * @module EasySvg
 * @class EasySvg
 * @static
 * @namespace 
 * @author Helge Andersen
 * @version 0.0.1.0
 */
var EasySvg = {    
    /**
     * Creates an svg DOM element
     * @method svg
     * @param {object} config 
     * @return {SvgCanvas}
     */
    svg: function(config) {
        if (!EasySvg.isSupported()) {
            console.log("SVG is not supported in this browser version!");
            return undefined;
        }
        var _c = merge({el:document.body, attr:{}, shapes:[], defs:[]}, config);        
        return new SvgCanvas(_c).attr(_c.attr);        
    },
    
    /**
     * Check if SVG is supported by the browser
     * @method isSupported
     * @return {Boolean}
     */
    isSupported: function() {
        return window.SVGAngle || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.0");

    }
}